g++ theta_solver_nlopt.cpp -o theta_solver_nlopt -lnlopt -lm
./theta_solver_nlopt